home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_##_(05-1985).d64
/
in order.c2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
9KB
|
331 lines
1 GOTO910
2 REM ** ML STOP KEY DISABLE **
3 PRINT"x[169]=[141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X`
4 [153]"xhhh+hNOThhhhhhhPRINT#HRUNHX`111"
5 [153]"hhhhhhh`1"
6 [143] ** 4 - POP ML SUBROUTINE **
10 [143] **GENERAL INPUT ROUTINE **
15 :
20 [143] ** TO OUR BEST KNOWLEDGE THIS
21 [143] PROGRAM IS FREE FOR
22 [143] DUPLICATION IN CANADA.
23 [143] IF YOU HAVE CONTARY
24 [143] INFORMATION, PLEASE
25 [143] CONTACT COMMODORE CANADA AND
26 [143] EVERY EFFORT WILL BE MADE TO
27 [143] WITHDRAW COPIES OF THIS
28 [143] PROGRAM.
30 :
35 [143] +++ INPUT SECTION +++
40 UR$[178]"":UI$[178]"":[151] UO,0
42 [139]UL[178]0[167]UL[178]80
45 [151]UC,0
50 [161]UI$:[139]UI$[178]""[167]50
55 [139]UI$[178][199](13)[175][195](UR$)[177][178]1[167][151]UC,1:[153]" CMD";:[137]85
60 [139]UI$[178][199](20)[167]105
62 [139] [195](UR$)[178][177]UL[167]50
65 [141]120:[143] CHECK FOR VALID CHARACTER
70 UR$[178]UR$[170]UI$
75 [153]UI$;
80 [137]50
85 [143] +++ CHECK FOR HELP REQUEST +++
90 [139]UR$[178]UX$[167]195:[143] EXIT TO HELP ROUTINE
95 [139]UF[178]1[167][141]240
100 UF[178]0:[153]:[142]
102 [143] ++ CHECK DELETE ++
105 [139][195](UR$)[179]1[167]50
110 UR$[178][200](UR$,[195](UR$)[171]1)
115 [153]"CMD CMDCMD";:[137]50
120 [143] ++ CHECK FOR VALID CHARACTERS ++
125 [139][195](US$)[178]0[167]150
127 US$[178]US$[170]UX$
130 [129]US[178]1[164][195](US$)
135 [139]UI$[178][202](US$,US,1)[167][142]
140 [130]
145 UI$[178]"":[142]
150 [143] ** STANDARD INPUT **
152 [139][198](UI$)[178]46[167][142]
155 [139]UI$[178][199](32)[167][142]
160 [139][198](UI$)[179]48[176][198](UI$)[177]57[167]170
165 [142]
170 [139][198](UI$)[179]65[176][198](UI$)[177]90[167]180
175 [142]
180 [139][198](UI$)[179]193[176][198](UI$)[177]218[167]UI$[178]"":[142]
185 [139][194](UT)[178]UU%[167]UI$[178][199]([198](UI$)[171]128):[142]
187 [142]
190 UI$[178]"":[142]
195 UF[178]1:[143] +++ HELP ROUTINE EXIT +++
197 [141]250
200 [141]245
205 [129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]2)
210 UQ%(UQ[171]UB)[178][194](UQ):[130]:[153]"LOAD"
215 UZ[178]1:UV%[178][194](UT)
216 [137]300
217 UZ[178]0:US$[178]UJ$:UG$[178]UK$:UP[178]UJ:UL[178]UK:[139][194](50003)[178]0[167][151]53281,6:[151]53280,14
220 UT$[178]UL$:[153]"LOAD";:[151]UT,UV%:[129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]3)
225 [151]UQ,UQ%(UQ[171]UB):[130]
230 [151]U1,U1%
232 [151]U2,U2%
233 [151]U4,U4%
234 [151]U3,U3%[171]1
235 [137]35
240 UD%[178]((U2%[172]256[170]U1%[170]U3%)[171]UB)[173]40:[153][200](UD$,UD%[170]1):[142]
245 [153][200](UD$,24);" HELP COMING WAIT ":[142]
250 U1%[178][194](U1):U2%[178][194](U2):U3%[178][194](U3):U4%[178][194](U4)
251 UJ$[178]US$:UK$[178]UG$:UL$[178]UT$:UJ[178]UP:UK[178]UL
255 [142]
300 [143] ** MENU **
301 :
302 [153]"LOAD":[151]UT,UU%:[139][194](50003)[178]0[167][151]53281,9:[151]53280,8
303 :
305 [153]" MENU"
310 [153]" --------------------------------------"
315 [153]" 1. BEGIN IN ORDER "
320 [153]" 2. STUDENT INSTRUCTIONS"
325 [153]" 3. TEACHER INSTRUCTIONS"
335 [153]" 4. QUIT"
340 [153]" --------------------------------------"
345 [153]" PRESS A NUMBER KEY (1-4) ";
350 UL[178]1:US$[178]"1234":[141]35:[143] INPUT ROUTINE
351 [139][195](UR$)[177]1[167]300
352 US$[178]""
355 [145][197](UR$)[141]1000,400,500,396
360 [137]300
395 [143] ** RE-ENABLE STOP KEY AND END **
396 [139][194](50003)[179][177]1[175][194](50003)[179][177]160[175][194](50003)[179][177]0[167]399
397 [158]UU[170]71:[139][194](50003)[178]0[167][151]53281,6:[151]53280,14
398 [153]"CONTLOAD":[128]
399 [141]875:[142]
400 [143] ** STUDENT INSTRUCTIONS **
405 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,0:[151]53280,0
410 UP[178]0:UG$[178]"(null)TUDENT RIGHT$NST":[141]850
420 [141]1140
425 [141]835:UP[178]2:[141]850
430 [153]" (null)OU'LL HAVE 20 TRIES TO GET THE NUMBER.
440 PRINT" [212]O SEE ALL TRIES PRESS G <RETURN>"
450 PRINT" INSTEAD OF ENTERING A NUMBER.
485 [141]835
490 [139]UZ[178]1[167][158]UP%:[137]217
499 [142]
500 [143] ** TEACHER INSTRUCTIONS **
501 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,2:[151]53280,10
502 UP[178]0:UG$[178]"(null)EACHER RIGHT$NST":[141]850
503 [153]" (null)O THE BEST OF OUR KNOWLEDGE,"
504 [153]" THIS PROGRAM IS IN THE PUBLIC"
505 [153]" DOMAIN. RIGHT$F THIS IS NOT THE CASE"
506 [153]" PLEASE CONTACT:"
507 [153]" LENOMMODORE PEEKUSINESS (null)ACHINES"
508 [153]" 3370 (null)HARMACY ATNVE.
509 PRINT" [193]GINCOURT, [207]NTARIO"
510 PRINT" [195]ANADA [205]1[215] 2[203]4"
511 PRINT" (416) 499-4292"
512 UP=1:GOSUB 835:GOSUB 850:
513 PRINT" [208]ROGRAM [206]AME: [201]N [207]RDER
514 [153]" (null)RITTEN PEEKY : STR$ PEEKUCKEYE"
515 [153]" (null)PGRADED PEEKY :
516 PRINT" [212]HIS PROGRAM WILL RUN ON ANY
517 [153]" PEEKATN(null)RIGHT$LENCLOSE2.0 (null)VAL(null) LEN(null)(null)(null)(null)(null)VAL(null)
518 PRINT" [194][193][211][201][195] 4.0 [208][197][212][160][195][207][205][208][213][212][197][210]
519 [153]" 8032 LENPEEK(null) LEN(null)(null)(null)(null)(null)VAL(null)
520 PRINT" [195][207][205][205][207][196][207][210][197] 64 [195][207][205][208][213][212][197][210]
521 [141]835:[141] 850
540 [153]" (null)HIS IS A GAME IN WHICH THE
550 PRINT" THE STUDENT TRIES TO FIGURE
560 [153]" OUT A 3 DIGIT NUMBER WITH CLUES
565 PRINT" FROM THE COMPUTER.
580 [141]835
590 [139]UZ[178]1[167][158]UP%:[137]217
599 [142]
600 [143] ** PROGRAM MODIFICATION INST **
601 [153]"LOAD":[151]UT,UL%
605 UP[178]0:UG$[178]"(null)ROGRAM (null)OD":[141]850
660 [141]835
690 [139]UZ[178]1[167][158]UP%:[137]217
699 [142]
700 [143] ** TO USE 8032 LOAD CBM4032 **
710 [153]"LOADBEFORE RUNNING THIS PROGRAM ON AN 8032
720 PRINT" LOAD THE 'CBM 4032' PROGRAM"
730 SYSUU+71
740 END
797 REM ** TO USE 8032 LOAD CBM4032 **
798 PRINT"[147]BEFORE RUNNING THIS PROGRAM ON AN 8032 LOAD CBM 4032 PROGRAM"
799 SYS1093:END
800 REM ** T I T L E P A G E **
802 PRINT"[147]";:POKEUT,UU%:IFPEEK(50003)=0THENPOKE53280,14:POKE53281,6
804 FORI=1TO38:PRINT"[166][146]";:NEXT
806 FORI=1TO22:PRINT"[157][166][146]";:NEXT
808 FORI=1TO37:PRINT"[157][157][166][146]";:NEXT
810 FORI=1TO22:PRINT"[145][157][166][146]";:NEXT
812 PRINT"[169] [146]
814 [153]" WAIT WAITSTEP
816 PRINT" [146] [163][223]
818 [153]"(null) WAIT
820 PRINT"C O M M O D O R E
822 [153]"EDUCATIONAL
824 PRINT"SOFTWARE
826 [143] ** COMMODORE LOGO **
827 [153][200](UD$,24);"PRESS SPACE BAR OR WAITWAIT":I[178]0
828 [161]A$:[139]A$[179][177]" "[167]I[178]I[170]1:[139]I[179]250[167]828
830 T1$[178]"":T2$[178]"":T3$[178]"":T4$[178]"":I[178]0
832 [137]300
835 [143] ** SPACE BAR PRESS **
840 [151] UO,0:[153][200](UD$,24);"PRESS SPACE BAR TO CONTINUEWAIT"
844 [161]UI$:[139]UI$[179][177]" "[167]844
846 [142]
850 [143] ** PAGE DESIGN ROUTINE **
852 UP[178]UP[170]1
855 [153]"LOAD"[200](UT$[170]UP$,21);[201](UP$[170]UG$[170][196](UP),18)
860 [153]" --------------------------------------"
864 [139]UH[179][177]0[167]870
865 [153][200](UD$,24);[200](UP$,7);"HELP - PRESS H <RETURN>"
870 UH[178]0:[153]"":[142]
875 [143] ** PLEASE WAIT REMARK **
880 [153][200](UD$,24);" ONE MOMENT PLEASE... "
885 [142]
900 [143] ** SET UP VARIABLES **
901 UX$[178]"H":[134]UQ%(1000):UB[178]32768:U1[178]196:U2[178]197:U3[178]198:U4[178]216:UC[178]167:UU[178]1024
902 UT[178]59468:UU%[178]12:UL%[178]14:UP%[178]1146:UM[178]32768:UO[178]158:[151] 50003,0
903 [139][194](50003)[178]0[167]UB[178]1024:U1[178]209:U2[178]210:U3[178]211:U4[178]214:UC[178]204:UU[178]2048
904 [139][194](50003)[178]0[167]UT[178]53272:UU%[178]21:UL%[178]23:UP%[178]2139:UM[178]1024:UO[178]198
905 UD$[178]""
906 UP$[178]" "
907 UT$[178]" RIGHT$(null)CLOSE(null)(null)STR$VAL(null)CLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSE":[143] PLACE PROGRAM TITLE HERE !!!!!!!!!!!!!!!!!***
908 [142]
910 [143] ** SET VARIABLES **
915 [141]900
916 [134] R$(21)
917 :
920 [143] ** CHECK FOR 8032 **
925 [153]"LOAD":[153]"CLOSE":[143] SHIFTED SPACE
930 [139][194](UB[170]40)[179][177]96[167][141]700
931 [143] ** MEMORY CHECK **
932 [139] [184](0)[177]2000[167]937
933 [153]"LOADTHIS MACHINE DOES NOT HAVE ENOUGH"
934 [153]"MEMORY TO RUN THIS PROGRAM !"
935 [158]UU[170]71
936 [128]
937 [153]"LOAD":[139][194](50003)[178]0[167]962
940 [143] ** BASIC 2.0 OR 4.0 OR C-64 SETUP **
941 [151]1075,133:[151]1076,144:[151]1077,234:[151]1079,4:[151]1080,133:[151]1081,145
942 [151]1091,155:[151]1098,133:[151]1099,144:[151]1100,234:[151]1103,133
943 [151]1104,145:[151]1105,234:[151]1082,234
945 [139][194](50003)[179][177]160[167]955
950 [151]1093,88:[151]1094,228:[151]1097,85:[151]1102,228:[137]965
955 [139][194](50003)[179][177]1[167]990
960 [151]1093,49:[151]1094,230:[151]1097,46:[151]1102,230:[137]965
962 [151]2099,141:[151]2100,20:[151]2101,3:[151]2103,8:[151]2104,141:[151]2105,21
963 [151]2106,3:[151]2115,145:[151]2117,52:[151]2118,234:[151]2121,49:[151]2122,141
964 [151]2123,20:[151]2124,3:[151]2126,234:[151]2127,141:[151]2128,21:[151]2129,3
965 [158]UU[170]48:[143] DISABLE STOP KEY
970 [141]800:[143] TITLE
980 [137]300:[143] MENU
990 [153]"LOADTHE PGM WILL NOT WORK ON THIS MACHINE!":[128]
1000 [139]UZ[178]1[167][158]UP%:[158]UP%:UZ[178]0:[143] ** PROGRAM STARTS HERE **
1001 [153]"LOAD";:[140]:[139][194](50003)[178]0[167][151]53281,6:[151]53280,14
1002 [153] "LOAD":[151] UT,UL%
1070 [137]1260
1100 [153]"LOAD"[163]15)"IN-ORDER"
1110 [153]""
1120 [153] [163]13);"BY D. BUCKEYE"
1125 [141]835
1130 [142]
1140 Y[178]0:T[178]255
1190 [153]" RIGHT$ AM THINKING OF A THREE-DIGIT NUMBER."
1200 [153]" (null)RY TO GUESS MY NUMBER AND RIGHT$ WILL GIVE"
1210 [153]" YOU CLUES AS FOLLOWS:"
1230 [153]" (null)RIGHT$LEN(null)-ONE DIGIT CORRECT BUT IN THE WRONG POSITION"
1240 [153]" ASCVAL(null)(null)RIGHT$-ONE DIGIT CORRECT AND IN THE RIGHT POSITION"
1250 [153]" PEEKATNCHR$VAL(null)(null)-NO DIGITS CORRECT"
1255 [142]
1260 [129] I[178]1 [164] 3
1270 A(I)[178][181](10[172][187](1))
1280 [139] I[171]1[178]0 [167] 1320
1290 [129] J[178]1 [164] I[171]1
1300 [139] A(I)[178]A(J) [167] 1270
1310 [130] J
1320 [130] I
1330 [153]"LOAD (null).K. RIGHT$ HAVE A NUMBER IN MIND."
1335 [129]I[178]1[164]1000:[130]
1340 [129] I[178]1 [164] 20
1345 UP[178]I:UG$[178]"":[141]850
1350 [153]" CHR$UESS #";I,
1360 UL[178]3:US$[178]"G1234567890":[141]35
1370 A$[178]UR$
1373 [139] A$[178]"G"[167][137]2000
1374 [139] [195](A$)[179]3 [167] 1350
1375 R$(I)[178]" "[170]A$[170]" - "
1380 [129] Z[178]1 [164] 3:A1(Z)[178][198]([202](A$,Z,1)): [130] Z
1390 [129] J[178]1 [164] 3
1400 [139] A1(J)[179]48 [167] 1450
1410 [139] A1(J)[177]57 [167] 1450
1420 B(J)[178]A1(J)[171]48
1430 [130] J
1440 [137] 1470
1450 [153]" WHAT?"
1460 [137] 1350
1470 [139] B(1)[178]B(2) [167] 1820
1480 [139] B(2)[178]B(3) [167] 1820
1490 [139] B(3)[178]B(1) [167] 1820
1500 C[178]0:D[178]0
1510 [129] J[178]1 [164] 2
1520 [139] A(J)[179][177]B(J[170]1) [167] 1540
1530 C[178]C[170]1
1540 [139] A(J[170]1)[179][177]B(J) [167] 1560
1550 C[178]C[170]1
1560 [130] J
1570 [139] A(1)[179][177]B(3) [167] 1590
1580 C[178]C[170]1
1590 [139] A(3)[179][177]B(1) [167] 1610
1600 C[178]C[170]1
1610 [129] J[178]1 [164] 3
1620 [139] A(J)[179][177]B(J) [167] 1640
1630 D[178]D[170]1
1640 [130] J
1650 [153]"":[139] D[178]3 [167] 1840
1660 [139] C[178]0 [167] 1700
1670 [129] J[178]1 [164] C
1675 R$(I)[178]R$(I)[170]" (null)RIGHT$LEN(null)"
1680 [153]" (null)RIGHT$LEN(null)";
1690 [130] J
1700 [139] D[178]0 [167] 1740
1710 [129] J[178]1 [164] D
1720 [153]" ASCVAL(null)(null)RIGHT$";
1725 R$(I)[178]R$(I)[170]" ASCVAL(null)(null)RIGHT$"
1730 [130] J
1740 [139] C[170]D[179][177]0 [167] 1760
1745 R$(I)[178]R$(I)[170]" PEEKATNCHR$VAL(null)(null)"
1750 [153]" PEEKATNCHR$VAL(null)(null)";
1760 [153]:[141]1230
1765 [141]835
1770 [130] I
1780 [153]" OH, WELL"
1790 [141]850:[153]" (null)HAT'S TWENTY GUESSES. (null)Y NUMBER WAS";100[172]A(1)[170]10[172]A(2)[170]A(3)
1800 [137] 1860
1810 [153]" (null)RY GUESSING A THREE-DIGIT NUMBER.":[137] 1350
1820 [153]" (null)H, RIGHT$ FORGOT TO TELL YOU THAT
1825 PRINT" THE NUMBER [201] HAVE IN MIND"
1830 PRINT" HAS NO TWO DIGITS THE SAME."
1832 GOSUB 835
1834 UP=UP-1
1835 GOSUB 850
1839 GOTO1350
1840 PRINT"[147] [217]OU GOT IT!!!":PRINT
1850 Y=Y+1
1860 PRINT" [208]LAY AGAIN (Y/N) ? ";
1865 UL=1:US$="YN":GOSUB35
1870 IFUR$="Y"THEN 1260
1880 IF Y=0 THEN 1900
1890 PRINT:PRINT " [193]";Y;"POINT BAGELS BUFF!!"
1900 PRINT" [200]OPE YOU HAD FUN. BYE."
1905 GOSUB835
1910 RETURN
2000 REM LIST TRIES
2010 PRINT"[147]"
2015 IF I=1 THEN 2060
2020 FOR N=1TOI-1
2030 PRINT" #"N;R$(N)
2040 NEXTN
2060 GOSUB835
2065 PRINT"[147]"
2070 GOTO 1345